
#ifndef _TTG_EXTRAS_CHARBUFFER_
#define _TTG_EXTRAS_CHARBUFFER_
#include "Common/Definitions.h"

#include <stdlib.h>
#include <string.h>

namespace ttg_internal
{
	class CharBuffer
	{
		private:
			const static int INIT_SIZE = 100;
			const static int INC_SIZE = 50;
			char *base;
			size_t cursize;
			size_t maxsize;
		public:
			CharBuffer(int size = INIT_SIZE);
			void addChar(char c);
			void addString(const char *s);
			char removeChar(); //aka stack
			const char *showContent() const;
			void clear();
			int isEmpty();
			~CharBuffer();
	};
}

#endif
